<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" name="referrer" content="no-referrer">
    <title>LEMON-面试那些事</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/css/blog.css}">
</head>

<body>
<div class="blog-masthead">
    <div class="container">
        <nav class="navbar navbar-default">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button class="navbar-toggle collapsed" type="button" data-toggle="collapse"
                            data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" th:href="@{/index}">首 页</a>
                </div>
                <div id="bs-navbar" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="#" class="blog-nav-item">面试那些事</a></li>
                        <li><a th:href="@{/timeTravel}" class="blog-nav-item">时间旅行</a></li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown hidden-xs" th:if="${session?.loginUser}!=null">
                            <a href="#" class="blog-nav-img" data-toggle="dropdown" role="button" aria-haspopup="true"
                               aria-expanded="false">
                                <img th:src="${session?.loginUser?.photo ne null}?
                                ${session?.loginUser?.photo}:@{/images/icon-user.png}"
                                     alt="头像" class="img-circle picture shadow">
                            </a>
                            <ul class="dropdown-menu">
                                <li><a th:href="@{'/dynamic/'+${session?.loginUser?.id}}">我的动态</a></li>
                                <li><a th:href="@{'/mydata/'+${session?.loginUser.id}}">我的资料</a></li>
                                <li><a th:href="@{/issue}">发布文章</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a th:href="@{/logout}">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
</div>

<div class="blog-main">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="blog-post">
                    <div class="col-md-6" th:each="article:${interviewList}">
                        <div class="thumbnail">
                            <a th:href="@{'/interview/'+${article?.id}}">
                                <img th:src="${article?.cover}"
                                     style="height: 200px; width: 100%; display: block;">
                            </a>
                            <div class="caption text-center">
                                <h3><a th:href="@{'/interview/'+${article?.id}}" th:text="${article?.title}"></a></h3>
                                <p>
                                    <span><i class="fa fa-user" th:text="${article?.author}"></i></span>
                                    <span><i class="fa fa-eye" th:text="${article?.views}"></i></span>
                                    <span><i class="fa fa-heart" th:text="${article?.collects}"></i></span>
                                    <span><i class="fa fa-commenting" th:text="${article?.comments}"></i></span>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
</div>

<footer class="blog-footer">
    <p>青柠的博客</p>
    <p>
        <a href="#">返回顶部</a>
    </p>
</footer>

<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
</body>

</html>